package com.naiterui.ehp.bs.doctor.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @Description 经纪人表
 * @Author yiren
 * @Date 2022/2/20 10:38 AM
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Entity
@Table(name = "ag_agent")
public class AgAgent implements Serializable {

    private static final long serialVersionUID = 8358060940157591094L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 姓名
     */
    @Column(name = "name")
    private String name;

    /**
     * 邀请码
     */
    @Column(name = "recomm_code")
    private String recommCode;
    /**
     * 性别  0：未知；1：男；2：女；
     */
    @Column(name = "gender")
    private Integer gender;
    /**
     * 手机号
     */
    @Column(name = "phone")
    private String phone;
    /**
     * 身份证号
     */
    @Column(name = "card_no")
    private String cardNo;
    /**
     * 身份证正面照片
     */
    @Column(name = "front_url")
    private String frontUrl;
    /**
     * 身份证反面照片
     */
    @Column(name = "back_url")
    private String backUrl;
    /**
     * 密码
     */
    @Column(name = "password")
    private String password;
    /**
     * 登录token
     */
    @Column(name = "token")
    private String token;
    /**
     * 账户状态：1:正常, 0:禁用
     */
    @Column(name = "account_status")
    private Integer accountStatus;
    /**
     * 用户状态(0:未认证, 1:待审核, 2:已认证, 3:已离职)
     */
    @Column(name = "status")
    private Integer status;
    /**
     * 头像地址
     */
    @Column(name = "head_url")
    private String headUrl;
    /**
     * 最后修改密码时间
     */
    @Column(name = "last_pwd_modify")
    private Date lastPwdModify;
    /**
     * 密码盐
     */
    @Column(name = "salt")
    private String salt;
    /**
     * 入职时间
     */
    @Column(name = "entry_time")
    private Date entryTime;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本控制
     */
    @Version
    @Column(name = "version")
    private Integer version;
}
